//绘制文字
function drawText() {
    
    creatText();
}
function creatText() {

    var sprite2 = new THREE.CanvasTexture( generateAreaText("区域2"));

    var material = new THREE.SpriteMaterial( {
        map: sprite2,
        //blending: THREE.AdditiveBlending,
        depthTest:false,
        opacity:1
    } );

    particle2 = new THREE.Sprite( material );
    particle2.scale.x = particle2.scale.y = 34;
    particle2.position.set(150,110,160);
    g_textgroup.add( particle2 );



    var sprite = new THREE.CanvasTexture( generateAreaText("区域1"));

    var material = new THREE.SpriteMaterial( {
        map: sprite,
        //blending: THREE.AdditiveBlending,
        depthTest:false,
        opacity:1
    } );

    particle = new THREE.Sprite( material );
    particle.scale.x = particle.scale.y = 34;
    particle.position.set(100,120,75);
    g_textgroup.add( particle );

    g_textgroup.rotation.x = -0.5*Math.PI;
    g_textgroup.rotation.z = -0.5*Math.PI;
    g_scene.add( g_textgroup );
    g_textgroup.visible = false;
}
function generateAreaText(text) {
    var canvas = document.createElement( 'canvas' );
    canvas.width = 256;
    canvas.height = 256;

    var context = canvas.getContext( '2d' );
    context.beginPath();
    context.font='50px Microsoft YaHei';
    context.fillStyle = "yellow";
    context.fillText(text,0,50);
    context.fill();
    context.stroke();
    return canvas;

}